.class public Lcom/instagram/android/people/b/a;
.super Lcom/instagram/e/b/b;
.source "PeopleTagFragment.java"


# instance fields
.field private a:Ljava/lang/String;

.field private b:Lcom/instagram/android/mediacache/IgImageView;

.field private c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

.field private d:Landroid/widget/TextView;

.field private e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

.field private f:Lcom/instagram/android/people/widget/PhotoScrollView;

.field private g:Z

.field private h:Lcom/instagram/android/people/widget/b;

.field private i:Lcom/instagram/android/people/widget/j;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 43
    invoke-direct {p0}, Lcom/instagram/e/b/b;-><init>()V

    .line 60
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/people/b/a;->g:Z

    .line 69
    new-instance v0, Lcom/instagram/android/people/b/b;

    invoke-direct {v0, p0}, Lcom/instagram/android/people/b/b;-><init>(Lcom/instagram/android/people/b/a;)V

    iput-object v0, p0, Lcom/instagram/android/people/b/a;->i:Lcom/instagram/android/people/widget/j;

    .line 259
    return-void
.end method

.method private X()Lcom/instagram/model/people/b;
    .locals 1

    .prologue
    .line 214
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/people/activity/PeopleTagActivity;

    invoke-virtual {v0}, Lcom/instagram/android/people/activity/PeopleTagActivity;->i()Lcom/instagram/model/people/b;

    move-result-object v0

    return-object v0
.end method

.method private Y()Ljava/util/ArrayList;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/instagram/pendingmedia/model/FaceBox;",
            ">;"
        }
    .end annotation

    .prologue
    .line 218
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/people/activity/PeopleTagActivity;

    invoke-virtual {v0}, Lcom/instagram/android/people/activity/PeopleTagActivity;->j()Ljava/util/ArrayList;

    move-result-object v0

    return-object v0
.end method

.method private Z()V
    .locals 3

    .prologue
    .line 224
    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->X()Lcom/instagram/model/people/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/model/people/b;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 225
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->d:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget v2, Lcom/facebook/ba;->people_tagging_tap_to_add:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/people/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\n"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget v2, Lcom/facebook/ba;->people_tagging_drag_to_move:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/people/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 235
    :cond_0
    iget-boolean v0, p0, Lcom/instagram/android/people/b/a;->g:Z

    if-eqz v0, :cond_1

    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->X()Lcom/instagram/model/people/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/model/people/b;->size()I

    move-result v0

    const/16 v1, 0x14

    if-ge v0, v1, :cond_1

    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/k;->e(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/k;->d(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 238
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->d:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 242
    :goto_0
    return-void

    .line 240
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->d:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/instagram/android/people/b/a;)Lcom/instagram/android/people/widget/PhotoScrollView;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->f:Lcom/instagram/android/people/widget/PhotoScrollView;

    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/people/b/a;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 43
    iput-boolean p1, p0, Lcom/instagram/android/people/b/a;->g:Z

    return p1
.end method

.method private aa()V
    .locals 8

    .prologue
    .line 245
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->i()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "media_id"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 246
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->i()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "people_tags"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getParcelableArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v4

    .line 249
    new-instance v0, Lcom/instagram/android/d/e/ae;

    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->u()Landroid/support/v4/app/aj;

    move-result-object v2

    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->X()Lcom/instagram/model/people/b;

    move-result-object v5

    new-instance v6, Lcom/instagram/android/people/b/f;

    const/4 v7, 0x0

    invoke-direct {v6, p0, v7}, Lcom/instagram/android/people/b/f;-><init>(Lcom/instagram/android/people/b/a;Lcom/instagram/android/people/b/b;)V

    invoke-direct/range {v0 .. v6}, Lcom/instagram/android/d/e/ae;-><init>(Landroid/content/Context;Landroid/support/v4/app/aj;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/instagram/android/d/j/a;)V

    invoke-virtual {v0}, Lcom/instagram/android/d/e/ae;->g()V

    .line 257
    return-void
.end method

.method static synthetic b(Lcom/instagram/android/people/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 43
    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->Z()V

    return-void
.end method

.method static synthetic c(Lcom/instagram/android/people/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 43
    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->aa()V

    return-void
.end method

.method static synthetic d(Lcom/instagram/android/people/b/a;)Lcom/instagram/android/widget/PeopleTagsSaveButton;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

    return-object v0
.end method


# virtual methods
.method public a(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 7
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v6, 0x0

    const/4 v5, -0x1

    .line 108
    sget v0, Lcom/facebook/ax;->fragment_people_tag:I

    invoke-virtual {p1, v0, p2, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    .line 111
    sget v1, Lcom/facebook/aw;->action_bar_button_back:I

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 112
    new-instance v2, Lcom/instagram/android/people/b/c;

    invoke-direct {v2, p0}, Lcom/instagram/android/people/b/c;-><init>(Lcom/instagram/android/people/b/a;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 120
    sget v2, Lcom/facebook/aw;->action_bar_button_done:I

    invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/instagram/android/widget/PeopleTagsSaveButton;

    iput-object v2, p0, Lcom/instagram/android/people/b/a;->c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

    .line 122
    sget v2, Lcom/facebook/aw;->image_view:I

    invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/instagram/android/mediacache/IgImageView;

    iput-object v2, p0, Lcom/instagram/android/people/b/a;->b:Lcom/instagram/android/mediacache/IgImageView;

    .line 123
    iget-object v2, p0, Lcom/instagram/android/people/b/a;->b:Lcom/instagram/android/mediacache/IgImageView;

    iget-object v3, p0, Lcom/instagram/android/people/b/a;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Lcom/instagram/android/mediacache/IgImageView;->setUrl(Ljava/lang/String;)V

    .line 125
    sget v2, Lcom/facebook/aw;->people_tagging_layout:I

    invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    iput-object v2, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    .line 127
    iget-object v2, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    iget-object v3, p0, Lcom/instagram/android/people/b/a;->i:Lcom/instagram/android/people/widget/j;

    invoke-virtual {v2, v3}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->setEditListener(Lcom/instagram/android/people/widget/j;)V

    .line 129
    invoke-static {}, Lcom/instagram/m/a/a;->a()Lcom/instagram/m/a/a;

    move-result-object v2

    invoke-virtual {v2}, Lcom/instagram/m/a/a;->g()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 130
    sget v2, Lcom/facebook/aw;->image_container:I

    invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/FrameLayout;

    .line 131
    new-instance v3, Lcom/instagram/android/people/widget/b;

    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {v3, v4}, Lcom/instagram/android/people/widget/b;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/instagram/android/people/b/a;->h:Lcom/instagram/android/people/widget/b;

    .line 132
    iget-object v3, p0, Lcom/instagram/android/people/b/a;->h:Lcom/instagram/android/people/widget/b;

    new-instance v4, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v4, v5, v5}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3, v4}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 138
    :cond_0
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->i()Landroid/os/Bundle;

    move-result-object v2

    const-string v3, "media_id"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_1

    .line 139
    iget-object v2, p0, Lcom/instagram/android/people/b/a;->c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

    invoke-virtual {v2, v6}, Lcom/instagram/android/widget/PeopleTagsSaveButton;->setVisibility(I)V

    .line 140
    iget-object v2, p0, Lcom/instagram/android/people/b/a;->c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

    new-instance v3, Lcom/instagram/android/people/b/d;

    invoke-direct {v3, p0}, Lcom/instagram/android/people/b/d;-><init>(Lcom/instagram/android/people/b/a;)V

    invoke-virtual {v2, v3}, Lcom/instagram/android/widget/PeopleTagsSaveButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 147
    sget v2, Lcom/facebook/av;->action_bar_glyph_back:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 150
    :cond_1
    sget v1, Lcom/facebook/aw;->tags_help_text:I

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/instagram/android/people/b/a;->d:Landroid/widget/TextView;

    .line 151
    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->Z()V

    .line 152
    sget v1, Lcom/facebook/aw;->photo_scroll_view:I

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/instagram/android/people/widget/PhotoScrollView;

    iput-object v1, p0, Lcom/instagram/android/people/b/a;->f:Lcom/instagram/android/people/widget/PhotoScrollView;

    .line 154
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->l()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v1

    iget v1, v1, Landroid/content/res/Configuration;->orientation:I

    const/4 v2, 0x2

    if-ne v1, v2, :cond_2

    .line 155
    iget-object v1, p0, Lcom/instagram/android/people/b/a;->f:Lcom/instagram/android/people/widget/PhotoScrollView;

    new-instance v2, Lcom/instagram/android/people/b/e;

    invoke-direct {v2, p0}, Lcom/instagram/android/people/b/e;-><init>(Lcom/instagram/android/people/b/a;)V

    invoke-virtual {v1, v2}, Lcom/instagram/android/people/widget/PhotoScrollView;->setOnMeasureListener(Lcom/instagram/android/widget/z;)V

    .line 180
    :cond_2
    return-object v0
.end method

.method public a()V
    .locals 1

    .prologue
    .line 210
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    invoke-virtual {v0}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->a()V

    .line 211
    return-void
.end method

.method public a(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 65
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->a(Landroid/os/Bundle;)V

    .line 66
    invoke-virtual {p0}, Lcom/instagram/android/people/b/a;->i()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "media_url"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/people/b/a;->a:Ljava/lang/String;

    .line 67
    return-void
.end method

.method public a(Landroid/view/View;Landroid/os/Bundle;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 197
    invoke-super {p0, p1, p2}, Lcom/instagram/e/b/b;->a(Landroid/view/View;Landroid/os/Bundle;)V

    .line 199
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->X()Lcom/instagram/model/people/b;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->a(Lcom/instagram/model/people/b;Z)V

    .line 200
    invoke-static {}, Lcom/instagram/m/a/a;->a()Lcom/instagram/m/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/m/a/a;->g()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 201
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->h:Lcom/instagram/android/people/widget/b;

    invoke-direct {p0}, Lcom/instagram/android/people/b/a;->Y()Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/android/people/widget/b;->setFaceBoxes(Ljava/util/List;)V

    .line 203
    :cond_0
    return-void
.end method

.method public a(Lcom/instagram/android/model/b/e;)V
    .locals 1
    .parameter

    .prologue
    .line 206
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    invoke-virtual {v0, p1}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->a(Lcom/instagram/android/model/b/e;)V

    .line 207
    return-void
.end method

.method public d_()Ljava/lang/String;
    .locals 1

    .prologue
    .line 292
    const-string v0, "people_tagging"

    return-object v0
.end method

.method public g_()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 185
    invoke-super {p0}, Lcom/instagram/e/b/b;->g_()V

    .line 187
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    invoke-virtual {v0, v1}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->setEditListener(Lcom/instagram/android/people/widget/j;)V

    .line 188
    iget-object v0, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    invoke-virtual {v0}, Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;->b()V

    .line 189
    iput-object v1, p0, Lcom/instagram/android/people/b/a;->e:Lcom/instagram/android/people/widget/PeopleTagsInteractiveLayout;

    .line 190
    iput-object v1, p0, Lcom/instagram/android/people/b/a;->b:Lcom/instagram/android/mediacache/IgImageView;

    .line 191
    iput-object v1, p0, Lcom/instagram/android/people/b/a;->c:Lcom/instagram/android/widget/PeopleTagsSaveButton;

    .line 192
    iput-object v1, p0, Lcom/instagram/android/people/b/a;->d:Landroid/widget/TextView;

    .line 193
    return-void
.end method
